import { defineConfig } from 'vitepress'
import sidebarConfig from './modules'

// https://vitepress.dev/reference/site-config
export default defineConfig({
  title: 'dongpx blog',
  description: 'dongpx blog',
  srcDir: './src',
  themeConfig: {
    // https://vitepress.dev/reference/default-theme-config
    nav: [
      {
        text: '嵌入式',
        link: '/embedded/'
      },
      {
        text: 'AI',
        link: '/ai/'
      },
      {
        text: '产品',
        link: '/product/'
      },
      {
        text: 'UI/UX',
        link: '/uiux/'
      },
      {
        text: '前端',
        items: [
          { text: 'Vue', link: '/front/vue/' },
          { text: 'React', link: '/front/react/' },
          { text: 'Node.js', link: '/front/nodejs/' },
          { text: 'Flutter', link: '/front/flutter/' },
          { text: 'Electron', link: '/front/electron/' },
          { text: 'Tauri', link: '/front/tauri/' }
        ]
      },
      {
        text: '后端',
        items: [
          { text: 'Spring', link: '/backend/spring/' },
          { text: 'SpringBoot', link: '/backend/springboot/' },
          { text: 'SpringCloud', link: '/backend/springcloud/' },
          { text: 'Dubbo', link: '/backend/dubbo/' },
          { text: 'Zookeeper', link: '/backend/zookeeper/' },
          { text: 'Mybatis', link: '/backend/mybatis/' },
          { text: 'Tomcat', link: '/backend/tomcat/' },
          { text: 'RabbitMQ', link: '/backend/rabbitmq/' },
          { text: 'ElasticSearch', link: '/backend/es/' },
          { text: 'Redis', link: '/backend/redis/' },
          { text: 'Netty', link: '/backend/netty/' }
        ]
      },
      {
        text: '测试',
        link: '/test/'
      },
      {
        text: '运维',
        items: [
          { text: 'Linux', link: '/op/linux/' },
          { text: 'Nginx', link: '/op/nginx/' },
          { text: 'Docker', link: '/op/docker/' },
          { text: 'K8s', link: '/op/k8s/' },
          { text: 'Jenkins', link: '/op/jenkins/' },
          { text: 'GitLab', link: '/op/gitlab/' },
          { text: 'Ansible', link: '/op/ansible/' },
          { text: 'Prometheus', link: '/op/prometheus/' }
        ]
      },
      {
        text: '数据库',
        items: [
          { text: 'MySQL', link: '/database/mysql/' },
          { text: 'MongoDB', link: '/database/mongodb/' }
        ]
      },
      {
        text: '编程语言',
        items: [
          { text: 'C', link: '/lang/c/intro' },
          { text: 'C++', link: '/lang/cpp/' },
          { text: 'Java', link: '/lang/java/' },
          { text: 'JavaScript', link: '/lang/js/' },
          { text: 'Typescript', link: '/lang/ts/' },
          { text: 'Python', link: '/lang/python/' },
          { text: 'Rust', link: '/lang/rust/' },
          { text: 'Swift', link: '/lang/swift/' },
          { text: 'Dart', link: '/lang/dart/' },
          { text: 'Go', link: '/lang/go/' }
        ]
      },
      {
        text: '计算机基础',
        items: [
          { text: '数据结构与算法', link: '/computer/ds/' },
          { text: '编译原理', link: '/computer/compile/' },
          { text: '操作系统', link: '/computer/system/' },
          { text: '计算机网络', link: '/computer/net/' },
          { text: '计算机组成原理', link: '/computer/composition/' },
          { text: '图形学', link: '/computer/graphics/' }
        ]
      }
    ],

    sidebar: sidebarConfig
  }
})
